package com.ssm.wzl.service.impl;

import com.ssm.wzl.dao.ItemsMapper;
import com.ssm.wzl.dao.UserMapper;
import com.ssm.wzl.po.*;
import com.ssm.wzl.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/7/20 0020.
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private ItemsMapper mapper;
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<Items> findList() throws Exception {
        ItemsExample example = new ItemsExample();
        List<Items> mList = mapper.selectByExample(example);
        return mList;
    }

    @Override
    public Person findPerson(String name) throws Exception {
        return userMapper.selectPersonforName(name);
    }

    @Override
    public void insertPerson(Person person) throws Exception {
        userMapper.insertPseron(person);
    }
}
